/*
 * 
 * Created on Jul 31, 2005
 */
package remato.client.view.projecttree;

import org.eclipse.jface.action.Action;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;

import remato.client.controller.RequirementPlugin;

/**
 * 
 * @author Petter L. H. Eide
 * @version $Id: SaveChangesAction.java,v 1.1 2006-01-23 19:58:38 petterei Exp $
 * 
 * Changelog:
 * 
 * $Log: SaveChangesAction.java,v $
 * Revision 1.1  2006-01-23 19:58:38  petterei
 * initial commit for client, fitting the alternative session implementation
 *
 * Revision 1.3  2005-11-26 00:14:54  petterei
 * *** empty log message ***
 *
 * Revision 1.2  2005/11/21 15:40:45  petterei
 * *** empty log message ***
 *
 * Revision 1.1  2005/09/27 21:06:18  petterei
 * *** empty log message ***
 *
 * Revision 1.3  2005/08/26 12:05:50  peide3
 * added savebutton
 *
 * Revision 1.2  2005/08/25 09:46:30  peide3
 * added batch update + bugfixes
 *
 * Revision 1.1  2005/08/23 06:36:39  peide3
 * new actions
 *
 * Revision 1.1  2005/07/31 22:55:09  petterei
 * initial commit
 *
 *
 */
public class SaveChangesAction extends Action {

    public SaveChangesAction() {
        super();
        init();
    }
    private void init( ){
        setText("Save all");
        setToolTipText("Save all changes");
        setEnabled(false);
        setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_ELEMENT));
    }
    /**
     * @see org.eclipse.jface.action.Action#run()
     */
    @Override
    public void run() {
        RequirementPlugin.getInstance().getSession().saveAll();
    }

    
}
